import 'package:flutter/material.dart';
import './fonts.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('图标列表'),
        ),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: const <Widget>[
        ListTile(
          leading: Icon(Icons.home, color: Colors.red,),
          title: Text('我是列表1'),
        ),
        Divider(),
        ListTile(
          leading: Icon(MyIcons.weixin, size: 18, color: Colors.green,),
          title: Text('我是列表2'),
          trailing: Icon(Icons.chevron_right),
        ),
        Divider(),
        ListTile(
          leading: Icon(MyIcons.book, size: 18, color: Colors.orange,),
          title: Text('我是列表3'),
          trailing: Icon(Icons.chevron_right),
        ),
      ],
    );
  }
}
